package com.tlxch.controller.teacher;

import com.tlxch.dto.TAlertdto;
import com.tlxch.dto.TStudto;
import com.tlxch.result.PageResult;
import com.tlxch.result.Result;
import com.tlxch.server.teacher.TAlertService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "预警管理相关接口")
@Slf4j
@RestController
@RequestMapping("/teacher/talert")
public class TAlertController {
    @Autowired
    TAlertService tAlertService;

    @GetMapping("/gettAlertList")
    @ApiOperation("预警记录分页查询")
    public Result<PageResult> getStuList(TAlertdto tAlertdto){
        PageResult pageResult = tAlertService.pageQuery(tAlertdto);
        return Result.success(pageResult);
    }

    @GetMapping("/getStuGradeList")
    @ApiOperation("预警记录分页查询")
    public Result<PageResult> getStuGradeList(TAlertdto tAlertdto){
        PageResult pageResult = tAlertService.getStuGradeList(tAlertdto);
        return Result.success(pageResult);
    }
}
